package com.lifp.controller;

import com.lifp.service.MessageService;
import com.lifp.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Author lfp
 * @Date 2022/7/22
 * @Version 1.0
 */
@RestController
@Api(tags = "消息接口管理")
@RequestMapping("message")
public class MessageController {
    @Autowired
    private MessageService messageService;

    @ApiOperation("同步消息推送")
    @PostMapping("sync/message")
    public Result<String> syncSendMessage(){
        return Result.ok(messageService.syncSendMessage());
    }

    @ApiOperation("异步消息推送")
    @PostMapping("async/message")
    public Result<String> asyncSendMessage(){
        return Result.ok(messageService.asyncSendMessage());
    }
}
